package com.xuecheng.api.client;

import com.xuecheng.api.client.fallback.LearningClientFallBackFactory;
import com.xuecheng.api.dto.XcCourseTablesDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * @author 勾新杰
 * @version 1.0
 * @description:
 * @date 2025/3/15 10:22
 */
@FeignClient(value = "learning-api", fallbackFactory = LearningClientFallBackFactory.class, path = "/learning")
public interface LearningClient {

    /**
     * 根据用户id查询我的课程表
     * @param userId 用户id
     * @return 课程表
     */
    @GetMapping("/course-tables/{userId}")
    List<XcCourseTablesDTO> getCourseTables(@PathVariable("userId") String userId);
}
